#include <stdio.h>

void adjust(int arr[],int size)
{
	int right = size - 1;
	int left = 0;
	int temp = 0;
	while (left < right)
	{
		while (left < right && arr[left] % 2 == 1)
		{
			left++;
		}
		while (left < right && arr[right] % 2 == 0)
		{
			right--;
		}
		temp = arr[left];
		arr[left] = arr[right];
		arr[right] = temp;
	}
}


int main()
{
	int a[10] = {1,2,3,4,5,6,7,8,9,0};
	int i = 0;
	for (i = 0; i < 10; i++)
	{
		printf("%d ", a[i]);
	}
	printf("\n");
	adjust(a, 10);
	for (i = 0; i < 10; i++)
	{
		printf("%d ", a[i]);
	}
	printf("\n");
	return 0;
}